package com.quarter.action;

import java.io.File;
import java.util.LinkedList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

public class FileListAction extends ActionSupport {
	private List<File> files = new LinkedList<File>();

	public String execute() throws Exception {
		return SUCCESS;
	}

	public List<File> getFiles() {
		File file = new File("./users/files/");
		File filelist[] = file.listFiles();
		for (File f : filelist) {
			files.add(f);
		}
		return files;
	}
}